Wireless Sensor Networks (WSNs) have been a great success in the past decades. Generally, a WSN refers to a set of small electronic devices (sensors) capable of monitoring and measuring certain phenomena, e.g., temperature, pressure, flood, fires, etc., usually in hazardous and non-reachable environments. A WSN is typically composed of hundreds to millions of nodes capable of intersecting and communicating with each other. Due to their small size, these devices have limited resources such as memory, computation power, battery lifetime and bandwidth.